#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
{
    QDockWidget *dock = new QDockWidget("Objetos");
    this->addDockWidget(Qt::LeftDockWidgetArea, dock);
    dock->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);

    obwidget = new ObjectsWidget();
    dock->setWidget(obwidget);

    viewport = new GLViewport;
    this->setCentralWidget(viewport);
    this->setMinimumSize(600,400);


    connect(obwidget,SIGNAL(ObjectChanged(Modelo*)),viewport,SLOT(SetModelo(Modelo*)));
    viewport->SetModelo(obwidget->copawidget->GetModel());

    connect(obwidget,SIGNAL(Updated()),viewport,SLOT(updateGL()));
}

MainWindow::~MainWindow()
{

}




